/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package bean;

import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import models.Users;
import services.Impl.UserServiceImpl;


/**
 *
 * @author amega
 */
@ManagedBean(name="testBean")
@SessionScoped
public class TestBean {

    /** Creates a new instance of TestBean */
    public TestBean() {
    }
    
    @EJB
    private UserServiceImpl userService;
    
    public String text1="test111";
    
    public String getUserName() {
        Users us = userService.getUsersByEmail("amega@online.ua");
        
        return us.getPassword();
    }

    public String getText1() {
        return text1;
    }

    public void setText1(String text1) {
        this.text1 = text1;
    }
    
    public String text() {
     
        return  text1;
    }
}
